import request from '@/axios/axios.js'

// 工序订单表查询
export const procedureOrderDataApi = (data) => {
    return request({
        method: 'post',
        url: '/api/planProcedureOrder/getPage',
        data: data
    })
}


//产品表
export const productAllApi = (params) => {
    return request({
        method: 'post',
        url: '/api/basedataProduct/getAll',
        data: params
    })
}

//删除
export const delProcedureOrderApi = (params) => {
    return request({
        method: 'delete',
        url: '/api/planProcedureOrder/delete',
        data: params
    })
}

//查找工序配置
export const procedureResourceApi = (params) => {
    return request({
        method: 'post',
        url: '/api/basedataProcedureResource/getPage',
        data: params
    })
}

//物料
export const materialApi = (params) => {
    return request({
        method: 'post',
        url: '/api/basedataMaterial/getAll',
        data: params
    })
}

//测试储位
export const basedataStorageApi = (params) => {
    return request({
        method: 'post',
        url: '/api/basedataStorage/getAll',
        data: params
    })
}


//生成领料单详情
export const materialTransferOrderApi = (params) => {
    return request({
        method: 'post',
        url: '/api/planProcedureOrder/getMaterialRequisition',
        data: params
    })
}


//设备
export const equipmentAll = (params) => {
    return request({
        method: 'post',
        url: '/api/basedataEquipment/getAll',
        data: params
    })
}

// 投入物料
export const putMaterialRedord = (params) => {
    return request({
        method: 'post',
        url: '/api/workOrder/saveBatch',
        data: params
    })
}



//开工
export const basedataWorkRecord = (params) => {
    return request({
        method: 'post',
        url: '/api/workOrderStartRecord/save',
        data: params
    })
}

//开工
export const procedureOrder = (params) => {
    return request({
        method: 'post',
        url: '/api/planProcedureOrder/procedureOrderQueryprocedure',
        data: params
    })
}

//下发
export const basedataWorkOrderUpdate = (params) => {
    return request({
        method: 'put',
        url: '/api/workOrder/update',
        data: params
    })
}

export const delBasedataWorkOrder = (params) => {
    return request({
        method: 'delete',
        url: '/api/workOrder/delete',
        data: params
    })
}
//工序下的工装

export const queryToolingByWork = (params) => {
    return request({
        method: 'post',
        url: '/api/planProcedureOrder/queryToolingByWork',
        data: params
    })
}
